<?php
/**

 //  DoYouHaoBaby-X Ucenter ( DoYouHaoBaby-X 计划 )
 //  +---------------------------------------------------------------------
 //
 //  “Copyright”
 //  +---------------------------------------------------------------------
 //	 | (C) 2010 - 2011 http://doyouhaobaby.net All rights reserved.
 //	 | This is not a free software, use is subject to license terms
 //  +---------------------------------------------------------------------
 //
 //  “About This File”
 //  +---------------------------------------------------------------------
 //	 | Ucenter 好友模型
 //  +---------------------------------------------------------------------

*/

!defined( 'DYHB_PATH' ) && exit;

class FriendModel extends CommonModel{

	/**
     * 返回对象的定义
     */
    static public function init__(){

        return array(

            'table_name' => 'friend',

            'props' => array(

                // 主键应该是只读，确保领域对象的“不变量”
                'friend_id' => array( 'readonly' => true ),
            ),

            'attr_protected' => 'friend_id',

        );

    }


	/**
     * 开启一个查询，查找符合条件的对象或对象集合
     */
    static function F( ){

        $arrArgs = func_get_args();
        return ModelMeta::instance( __CLASS__ )->findByArgs( $arrArgs );
    }


    /**
     * 返回当前 Model 类的元数据对象
     */
    static function M( ){

        return ModelMeta::instance(__CLASS__);
    }

}
